@SET exename=WinExeDemo_V1.0.0.1
@SET exepath=WinExePath
@SET rarpath="C:\Program Files\WinRAR\Rar.exe"
@SET winpath="C:\Program Files\WinRAR\WinRAR.exe"
@SET devpath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.com"

@SET SLNNAME="WinExeDemo.sln"
@SET BldType="rebuild"
@SET BldMode="Release|x64"

@echo start compile...
%devpath% %SLNNAME% /%BldType% %BldMode%

:: 创建打包
md %exepath%

copy  x64\Release\WinExeDemo.exe %exepath%\WinExeDemo.exe
copy  WinExeDemo\WinExeDemo.ico %exepath%\WinExeDemo.ico
xcopy WinExeDemo\lib %exepath%\ /s /y

%winpath% a -iicon./%exepath%/WinExeDemo.ico -sfx %exename%.exe ./%exepath%

%rarpath% c -z./config.txt %exename%.exe
